Use version patterns in ChangeDependencyGroupIdAndArtifactId tests#6856
Merged
Jenson3210 merged 1 commit intomainfrom Mar 3, 2026
Merged
Use version patterns in ChangeDependencyGroupIdAndArtifactId tests#6856Jenson3210 merged 1 commit intomainfrom
Jenson3210 merged 1 commit intomainfrom
Conversation
Replace hardcoded version 2.2.43 with regex pattern assertions in 4 tests that resolve swagger-annotations to the latest 2.2.x version. This prevents test failures when new swagger-annotations versions are released.
timtebeek
approved these changes
Mar 3, 2026
Member
timtebeek
left a comment
There was a problem hiding this comment.
Thanks for the structural fix here.
1 task
knutwannheden
added a commit
that referenced
this pull request
Apr 27, 2026
ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection hardcoded the post-recipe junit-jupiter version as 5.14.3, but the recipe resolves "5.x" against Maven Central at runtime. Every new junit-jupiter 5.x patch release breaks CI for every PR until someone bumps the literal. The most recent break is 5.14.4, published earlier today. Switch the assertion to a regex pattern matching any 5.x.x release, following the convention established in #6799 / #6856.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2.2.43with regex pattern assertions in 4 tests that resolveswagger-annotationsto the latest2.2.xversionswagger-annotationsversions are released (currently2.2.44)Problem
Four tests in
ChangeDependencyGroupIdAndArtifactIdTesthardcode the expected resolved version2.2.43forio.swagger.core.v3:swagger-annotationswhen using the2.2.xversion pattern. When version2.2.44was released, all four tests started failing.Solution
Use
spec.after(actual -> assertThat(actual).containsPattern(...).actual())— the same pattern already used elsewhere in this class — to match any2.2.xresolved version instead of hardcoding a specific patch version.Tests updated:
changeVersionPropertyInParentPomSimplesharedPropertyInParentPomLeavesPropertyUnchangedAndInlinesVersionsharedPropertyInParentPomUsedByDifferentChildrenLeavesPropertyUnchangedchildRedefinesPropertyUsedNonConflictinglyInlinesVersionInParentTest plan
ChangeDependencyGroupIdAndArtifactIdTestpass